import { htp, get, post, post2 } from "./http";

function Login(params) {
  return post("platform/login", params);
}

function selectDeviceInformation(params) {
  return get("platform/deviceManagement/selectDeviceInformation", params);
}
// 修改设备信息
function updateDevice(params) {
  return post("platform/deviceManagement/updateDeviceInformation", params);
}

function OrderInquiry(params) {
  return get("platform/orderManagement/selectOrderInformation", params);
}

function queryLog(params) {
  return get("platform/LogManagement/selectLogByCondition", params);
}
// 检验密码
function checkTrans(parmas) {
  return post2(
    "platform/userBranchManagement/checkTransactionPassword",
    parmas
  );
}

/**
 *  用户管理 *
 */
// 添加用户
function addUser(params) {
  return post("platform/userBranchManagement/insertUserInformation", params);
}
// 删除用户
function deleteUser(params) {
  return get("platform/userBranchManagement/deleteUser", params);
}
// 修改用户信息
function updateUserInfor(params) {
  return post("platform/userBranchManagement/updateUserInformation", params);
}
// 修改密码
function updateUserPassword(params) {
  return post2("platform/userBranchManagement/updateUserPassword", params);
}
//查询用户
function getUser(params) {
  return get("platform/userBranchManagement/selectUserStatistics", params);
}
// 查询账号信息
function getAccount(params) {
  return get("platform/userBranchManagement/selectUserInformation", params);
}
// 验证用户
function verifyUserName(params) {
  return get("platform/userBranchManagement/verificationUsername", params);
}
// 查询角色信息
function roleInfo() {
  return get("platform/userBranchManagement/selectRoleInformation");
}

export {
  selectDeviceInformation,
  updateDevice,
  OrderInquiry,
  Login,
  queryLog,
  addUser,
  deleteUser,
  updateUserInfor,
  updateUserPassword,
  getUser,
  verifyUserName,
  roleInfo,
  getAccount,
  checkTrans,
};
